const state = {
    // 导航栏菜单是否隐藏
    isCollapse:false,
    // 导航栏列表数据
    menusList: [
        { id: '/', icon: 'mdi mdi-book', value: '首页' },
        { id: '/test', icon: 'mdi mdi-book', value: '测试页面' },
        { id: '/enterprise/list', icon: 'mdi mdi-book', value: '企业列表' },
        {
            id: '/client',
            icon: 'mdi mdi-view-column',
            value: '客户管理',
            data: [
                { 
                    id: '/client/list', icon: 'mdi mdi-circle', value: '客户列表' 
                },
                {
                    id: '/framework',
                    icon: 'mdi mdi-circle',
                    value: '组织架构',
                    data: [
                        {
                            id: 'layout',
                            icon: 'mdi mdi-circle-outline',
                            value: '账号管理'
                        },
                    ]
                }
            ]
        },
        {
            id: '/setting',
            icon: 'mdi mdi-calendar',
            value: '设置',
            data: [
                { id: 'kanban', icon: 'mdi mdi-circle', value: '修改密码' },
            ]
        }
    ]
}

// getters
const getters = {}

// actions
const actions = {}

// mutations
const mutations = {
    // 更新一级导航点击的索引
    updateMenusNavIndex(state, payload) {
        state.menusNavIndex = payload
    },
    // 更新二级侧边栏一级侧边栏索引改变
    updateSecondNavIndex(state, index) {
        state.updatNavIndex = index
    },
    // 更新二级导航显示隐藏
    updateIsCollapse(state, payload) {
        state.isCollapse = payload
    }
}

export default {
    state,
    getters,
    actions,
    mutations
}
